# Log module
QT += core
TEMPLATE = lib
CONFIG += dll

DEFINES += ZFLIB_MAKER

DESTDIR = $$PWD/dist

CONFIG(debug,debug|release) {
    TARGET = ZLogger_d
} else {
    TARGET = ZLogger
}

include($$PWD/../ZFLibCommon.pri)
include(ZFileLogger/ZFileLogger.pri)
include(ZLogBrowser/ZLogBrowser.pri)

HEADERS += \
    $$PWD/ZLogger.h \
    $$PWD/ZLoggerDefines.h \
    ZQtDebugHandler.h

SOURCES += \
    $$PWD/ZLogger.cpp \
    $$PWD/ZLoggerDefines.cpp \
    ZQtDebugHandler.cpp

RESOURCES += \
    Resource/Resource.qrc

# install
ZLogger_1.files = $$PWD/ZLogger.h \
    $$PWD/ZLoggerDefines.h $$PWD/ZQtDebugHandler.h \
    $$PWD/ZFileLogger/ZFileLogger.h \
    $$PWD/ZLogBrowser/ZQtDebugLogBrowser.h \
    $$PWD/../ZFLibGlobal.h $$PWD/../ZFCommonHeader.h
ZLogger_1.path =  $$DIST_DIR/ZLogger/include
INSTALLS += ZLogger_1

ZLogger_2.files = $$PWD/ZLogger.pri
ZLogger_2.path =  $$DIST_DIR/ZLogger
INSTALLS += ZLogger_2

# install to DIST_DIR
defined(DIST_DIR, var) {
ZLogger_3.files = $$PWD/dist/*
ZLogger_3.path =  $$DIST_DIR/ZLogger/bin
INSTALLS += ZLogger_3
}
